package luzhin;

/**
 * A simple implementation of Evaluator interface. Evaluates only materal.
 * @author lacungus
 * @deprecated
 *
 */
public class MaterialEvaluator implements Evaluator {
	/**
	 * 
	 */
	public MaterialEvaluator() {		
	}
	
	private static final double[] pieceValues = {0.0, 10000.0, 9.0, 3.0, 3.0, 5.0, 1.0, -10000.0, -9.0, -3.0, -3.0, -5.0, -1.0};
	// Infinity
	public static final double INF = 1e10;
	
	/**
	 * Evaluate the given board.
	 */
	public double evaluate(Board board) {
		double s = 0.0;
		for (int i=0;i<Board.SIZE;++i)
			s += pieceValues[board.getPiece(i)];
		return s;
	}
	
	public double evaluate(Board board, AttackDiagram diagram) {
		return 0;
	}
	/**
	 * 
	 */
	public double getInf() {
		return INF;
	}
}
